package com.lost.octopus.es.processor.conf;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Feign配置，支持多层继承feign接口
 * @author zhangbh
 **/
@Configuration
@ConditionalOnClass(FeignAutoConfiguration.class)
@EnableFeignClients(basePackages = {"com.lost.octopus.es.processor.feign"})
public class FeignConfig {

    @Bean
    @ConditionalOnClass(FeignAutoConfiguration.class)
    public HierarchicalContract hierarchicalContract() {
        return new HierarchicalContract();
    }
}
